<?php

$loader = new \Phalcon\Loader();

/**
 * We're a registering a set of directories taken from the configuration file
 */
$loader->registerDirs(
    array(
        $config->application->controllersDir,
        $config->application->modelsDir
    ));

$loader->registerNamespaces(array(
    'PhalconTutorial\Models' => $config->application->modelsDir,
    'PhalconTutorial\Controllers' => $config->application->controllersDir,
    'PhalconTutorial\Forms' => $config->application->formsDir,
    'PhalconTutorial' => $config->application->libraryDir
));

$loader->register();

// Use composer autoloader to load vendor classes
require_once __DIR__ . '/../../vendor/autoload.php';

